<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <hr />
            <p>父:</p>
            <child :tochild="money"></child>
        </div>
        <template id="child">
            <div>
                <hr />
                <p>Child:</p>
                <p>车: {{tochild.car}}</p>
                <p>房: {{tochild.house}}</p>
                <button>按钮</button>
            </div>
        </template>
        <script src="../vue.js"></script>
        <script>
            let child = {
                props: ['tochild'],
                template: '#child',
            };
            new Vue({
                el: '#app',
                data() {
                    return {
                        money: {
                            car: 1,
                            house: 1,
                        },
                    };
                },
                components: {
                    child,
                },
            });
        </script>
    </body>
</html>
